﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace VehicleRecordSystem.view
{
    /// <summary>
    /// Interaction logic for dashboard.xaml
    /// </summary>
    public partial class Dashboard : Page
    {
        private static Dashboard instanse;

        public static Dashboard Instanse
        {
            get
            {
                if (instanse == null)
                {
                    instanse = new Dashboard();
                }

                return instanse;
            }
        }

        public Dashboard()
        {
            InitializeComponent();
        }

        private void btnVehicle_Click(object sender, RoutedEventArgs e)
        {
            MainWindow.Instanse.ContentFrame.Content = VehiclePage.Instanse;
        }

        private void btnDrive_Click(object sender, RoutedEventArgs e)
        {
            MainWindow.Instanse.ContentFrame.Content = DrivePage.Instanse;
        }

        private void btnInsurace_Click(object sender, RoutedEventArgs e)
        {
            MainWindow.Instanse.ContentFrame.Content = VehicleInsurancePage.Instanse;
        }

        private void btnService_Click(object sender, RoutedEventArgs e)
        {
            MainWindow.Instanse.ContentFrame.Content = ServicePage.Instanse;
        }

        private void btnRepair_Click(object sender, RoutedEventArgs e)
        {
            MainWindow.Instanse.ContentFrame.Content = RepairPage.Instanse;
        }

        private void btnFuel_Click(object sender, RoutedEventArgs e)
        {
            MainWindow.Instanse.ContentFrame.Content = FuelPage.Instanse;
        }

        private void btnExpense_Click(object sender, RoutedEventArgs e)
        {
            MainWindow.Instanse.ContentFrame.Content = ExpensePage.Instanse;
        }

        private void btnLicense_Click(object sender, RoutedEventArgs e)
        {
            MainWindow.Instanse.ContentFrame.Content = licensePage.Instanse;
        }

        private void btnSettings_Click(object sender, RoutedEventArgs e)
        {
            MessageBox.Show("Yet to develop", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
        }

    }
}
